package cn.gson.crmdemo.model.vo;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "contract")
public class ContractCustomerVo {
	@Id
	@Column(name="contract_id")
	private int contractId;

	@Column(name="contract_emp_name")
	private String contractEmpName;

	@Column(name="contract_get_money")
	private BigDecimal contractGetMoney;

	@Column(name="contract_remark")
	private String contractRemark;

	@Column(name="contract_theme")
	private String contractTheme;

	@Column(name="contract_type")
	private int contractType;

	@Column(name="customer_ontractor")
	private String customerOntractor;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="end_time")
	private Date endTime;

	@Column(name="foreign_remark")
	private String foreignRemark;

	@Column(name="gross_profit")
	private BigDecimal grossProfit;

	@Column(name="our_contractor")
	private String ourContractor;

	@Column(name="pay_method")
	private int payMethod;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="signing_date")
	private Date signingDate;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="start_time")
	private Date startTime;

	@Column(name="total_sum")
	private BigDecimal totalSum;

	//bi-directional many-to-one association to Customer
	
	@Column(name="customer_id")
	private int customerId;

	public int getContractId() {
		return contractId;
	}

	public void setContractId(int contractId) {
		this.contractId = contractId;
	}

	public String getContractEmpName() {
		return contractEmpName;
	}

	public void setContractEmpName(String contractEmpName) {
		this.contractEmpName = contractEmpName;
	}

	public BigDecimal getContractGetMoney() {
		return contractGetMoney;
	}

	public void setContractGetMoney(BigDecimal contractGetMoney) {
		this.contractGetMoney = contractGetMoney;
	}

	public String getContractRemark() {
		return contractRemark;
	}

	public void setContractRemark(String contractRemark) {
		this.contractRemark = contractRemark;
	}

	public String getContractTheme() {
		return contractTheme;
	}

	public void setContractTheme(String contractTheme) {
		this.contractTheme = contractTheme;
	}

	public int getContractType() {
		return contractType;
	}

	public void setContractType(int contractType) {
		this.contractType = contractType;
	}

	public String getCustomerOntractor() {
		return customerOntractor;
	}

	public void setCustomerOntractor(String customerOntractor) {
		this.customerOntractor = customerOntractor;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getForeignRemark() {
		return foreignRemark;
	}

	public void setForeignRemark(String foreignRemark) {
		this.foreignRemark = foreignRemark;
	}

	public BigDecimal getGrossProfit() {
		return grossProfit;
	}

	public void setGrossProfit(BigDecimal grossProfit) {
		this.grossProfit = grossProfit;
	}

	public String getOurContractor() {
		return ourContractor;
	}

	public void setOurContractor(String ourContractor) {
		this.ourContractor = ourContractor;
	}

	public int getPayMethod() {
		return payMethod;
	}

	public void setPayMethod(int payMethod) {
		this.payMethod = payMethod;
	}

	public Date getSigningDate() {
		return signingDate;
	}

	public void setSigningDate(Date signingDate) {
		this.signingDate = signingDate;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public BigDecimal getTotalSum() {
		return totalSum;
	}

	public void setTotalSum(BigDecimal totalSum) {
		this.totalSum = totalSum;
	}

	public int getCustomerId() {
		return customerId;
	}

	public void setCustomerId(int customerId) {
		this.customerId = customerId;
	}

	public ContractCustomerVo(int contractId, String contractEmpName, BigDecimal contractGetMoney,
			String contractRemark, String contractTheme, int contractType, String customerOntractor, Date endTime,
			String foreignRemark, BigDecimal grossProfit, String ourContractor, int payMethod, Date signingDate,
			Date startTime, BigDecimal totalSum, int customerId) {
		super();
		this.contractId = contractId;
		this.contractEmpName = contractEmpName;
		this.contractGetMoney = contractGetMoney;
		this.contractRemark = contractRemark;
		this.contractTheme = contractTheme;
		this.contractType = contractType;
		this.customerOntractor = customerOntractor;
		this.endTime = endTime;
		this.foreignRemark = foreignRemark;
		this.grossProfit = grossProfit;
		this.ourContractor = ourContractor;
		this.payMethod = payMethod;
		this.signingDate = signingDate;
		this.startTime = startTime;
		this.totalSum = totalSum;
		this.customerId = customerId;
	}

	public ContractCustomerVo() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public String toString() {
		return "ContractCustomerVo [contractId=" + contractId + ", contractEmpName=" + contractEmpName
				+ ", contractGetMoney=" + contractGetMoney + ", contractRemark=" + contractRemark + ", contractTheme="
				+ contractTheme + ", contractType=" + contractType + ", customerOntractor=" + customerOntractor
				+ ", endTime=" + endTime + ", foreignRemark=" + foreignRemark + ", grossProfit=" + grossProfit
				+ ", ourContractor=" + ourContractor + ", payMethod=" + payMethod + ", signingDate=" + signingDate
				+ ", startTime=" + startTime + ", totalSum=" + totalSum + ", customerId=" + customerId + "]";
	}
	
	
}
